
class SysModel {
  String ver;
  String logo;
  String start;
  List<LaunchModel> launch;
  List<LaunchModel> chatback;
  List<LaunchModel> avatar;
  List<LaunchModel> longback;
  List<LaunchModel> chatface;

  SysModel(
      {this.ver,
      this.logo,
      this.start,
      this.launch,
      this.chatback,
      this.avatar,
      this.longback,
      this.chatface});

  SysModel.fromJson(Map<String, dynamic> json) {
    ver = json['ver'];
    logo = json['logo'];
    start = json['start'];
    if (json['launch'] != null) {
      launch = new List<LaunchModel>();
      json['launch'].forEach((v) {
        launch.add(new LaunchModel.fromJson(v));
      });
    }
    if (json['chatback'] != null) {
      chatback = new List<LaunchModel>();
      json['chatback'].forEach((v) {
        chatback.add(new LaunchModel.fromJson(v));
      });
    }
    if (json['avatar'] != null) {
      avatar = new List<LaunchModel>();
      json['avatar'].forEach((v) {
        avatar.add(new LaunchModel.fromJson(v));
      });
    }
    if (json['longback'] != null) {
      longback = new List<LaunchModel>();
      json['longback'].forEach((v) {
        longback.add(new LaunchModel.fromJson(v));
      });
    }
    if (json['chatface'] != null) {
      chatface = new List<LaunchModel>();
      json['chatface'].forEach((v) {
        chatface.add(new LaunchModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['ver'] = this.ver;
    data['logo'] = this.logo;
    data['start'] = this.start;
    if (this.launch != null) {
      data['launch'] = this.launch.map((v) => v.toJson()).toList();
    }
    if (this.chatback != null) {
      data['chatback'] = this.chatback.map((v) => v.toJson()).toList();
    }
    if (this.avatar != null) {
      data['avatar'] = this.avatar.map((v) => v.toJson()).toList();
    }
    if (this.longback != null) {
      data['longback'] = this.longback.map((v) => v.toJson()).toList();
    }
    if (this.chatface != null) {
      data['chatface'] = this.chatface.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class LaunchModel {
  String name;
  String url;
  int id;

  LaunchModel({this.name, this.url, this.id});

  LaunchModel.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    url = json['url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['url'] = this.url;
    return data;
  }
}